#pragma once
#include <iostream>
#include "NesCpu.h"

/* document
* [1]http://wiki.nesdev.com/w/index.php/NES_2.0
* [2]http://wiki.nesdev.com/w/index.php/CPU
* [3]http://wiki.nesdev.com/w/index.php/CPU_unofficial_opcodes
* [4]https://wusiyu.me/6502-cpu%e6%b1%87%e7%bc%96%e8%af%ad%e8%a8%80%e6%8c%87%e4%bb%a4%e9%9b%86/
* [5]http://fogota.ys168.com/
* [6]http://wiki.nesdev.com/w/index.php/Sample_RAM_map
* [7]http://nesdev.com/nestech_cn.txt
* [8]http://wiki.nesdev.com/w/index.php/PPU_programmer_reference
*/

struct RomInfo
{
	uint8_t  prgRomSize;// base 16 * 1024
	uint8_t* prgRomData;
	uint8_t  chrRomSize;// base 8 * 1024
	uint8_t* chrRomData;

	uint8_t  mapperNum;

	//flag
	bool isVMirror;
	bool isTrainer;
	bool isFourScreenMode;
};

class App
{
private:
	RomInfo romInfo;

	NesCpu* nesCpu;
public:
	bool LoadNES(const char* file);
};

